import request from "@/utils/request";

//从配置中获取业务的地址
import { baseUrlConfig } from "@/config/config";
const basePath = baseUrlConfig.businessBaseUrl;

interface Order {
  column: String;
  method: String;
}
export interface PageListType {
  pageNum: number;
  pageSize: number;
  condition: {
    alarmType: String;
    terminal?: String;
    createTime?: String;
    order?: Array<Order>;
  };
}

// 获取分页列表
export const eqptPageList = (data: any) => {
  return request({
    url: basePath + "/eqpt/type/find/page",
    method: "post",
    data: data,
  });
};

// 新增数据
export const addeEqptPage = (data: any) => {
  return request({
    url: basePath + "/eqpt/type/append",
    method: "post",
    data: data,
  });
};

// 删除
export const eqptPageDelete = (data: any) => {
  return request({
    url: basePath + "/eqpt/type/delete",
    method: "post",
    data,
  });
};

//TOC接口
export const getFindTree = (data: any) => {
  return request({
    url: basePath + "/eqpt/type/find/tree",
    method: "post",
    data,
  });
};

//修改接口

export const upDatePage = (data: any) => {
  return request({
    url: basePath + "/eqpt/type/update",
    method: "post",
    data,
  });
};
